import { defineStore } from "pinia";
// import { getBanners } from "~/api/banner";
// import type { articleItem } from "~/types/article";
export const useArticleStore = defineStore("articleList", {
  state: () => {
    return {
      list: [],
      article: {},
    };
  },
  getters: {
    articleList: (state) => state.list,
  },
  actions: {
    async fetchArticleList() {
      const { data } = await useApiFetch("/newapi/article");
      this.list = data.value.data.list;
    },
  },
});
